package BasicClient;

/**
 * This class holds onto all the constant headers in the forbes protocol.
 * The headers are 1-byte, unfortunately java does not have unsigned primitives
 * and therefore a short is used to hold onto the byte. Yes yes, it uses twice the memory
 * but that is java for you.
 * @author pokeefe
 *
 */
public class Constants {	
	
	public class PlayerBroadcastConstants {		
		// Constants for player actions
		public static final byte ACTION_CALL_HEADER = (byte)0xD1;
		public static final byte ACTION_RAISE_HEADER = (byte)0xD5;
		public static final byte ACTION_FOLD_HEADER = (byte)0xD7;
		
		// Constants for player ID
		public static final byte REQUEST_ID_HEADER = (byte) 0xDD;
		public static final int SPECIAL_PLAYER_ID = (int) 0xFFFFFFFF;
				
		// Constants for requesting blinds
		public static final byte REQUEST_BLINDS_HEADER = (byte)0xDA;
		
		// Constants for requesting a seat
		public static final byte REQUEST_SEAT_HEADER = (byte) 0xDE;
		public static final short SPECIAL_TABLE_ID = (short) 0xFFFF;
	}
	
	public class ServerBroadcastConstants {		
		public static final byte SET_BLINDS_HEADER = (byte) 0x20;
		public static final byte SET_ORDER_HEADER = (byte) 0x21;
		
		public static final byte PLAYER_FOLD_HEADER = (byte) 0x24;
		public static final byte PLAYER_CALL_HEADER = (byte) 0x25;
		public static final byte PLAYER_RAISE_HEADER = (byte) 0x26;
		
		public static final byte PLAYER_DISC_CONN_HEADER = (byte) 0x2F;
		
		// Constants for game administration
		public static final byte NEW_GAME_HEADER = (byte) 0x29;
		public static final byte NEW_HAND_HEADER = (byte) 0x28;
		public static final byte END_HAND_HEADER = (byte) 0x2A;
		
		// Constants for hand phases
		public static final byte FLOP_HEADER = (byte) 0x2C;
		public static final byte TURN_HEADER = (byte) 0x2E;
		public static final byte RIVER_HEADER = (byte) 0x2D;
		
	}
	
	public class ServerToPlayerConstants{		
		public static final byte ASSIGN_PLAYER_ID_HEADER = (byte) 0x96;
		public static final byte ACTION_REQUIRED_HEADER = (byte)0x97;
		public static final byte HOLE_CARDS_HEADER = (byte)0x92;
	}
}
